//
//  RCDBaseRefreshCollectionVC.h
//  MyFamilyNet
//
//  Created by 任辰东 on 2018/7/20.
//  Copyright © 2018年 任辰东. All rights reserved.
//

#import "RCDBaseViewController.h"
#import "RCDBaseCollectionViewCell.h"

@interface RCDBaseRefreshCollectionVC : RCDBaseViewController<UICollectionViewDelegate, UICollectionViewDataSource>

@property (nonatomic, strong) UICollectionView *myCollectionView;
@property (nonatomic, strong) NSMutableArray *dataSourceArr;

- (void)setupLayout:(UICollectionViewLayout *)layout registerCells:(NSArray *)cells;

/**
 *  手动触发刷新
 */
- (void)beginRefresh;

/**
 *  必须重写该方法，请求列表数据
 *
 */
- (void)requestDataWithOffset:(NSInteger)offset
                      success:(void (^)(NSArray *dataArr))success
                      failure:(void (^)(NSString *msg))failure;

/**
 *  当cell里的子控件需要些block回调时重载该方法
 *
 */
- (void)configCellSubViewsCallback:(RCDBaseCollectionViewCell *)cell indexPath:(NSIndexPath *)indexPath;
@end
